<%@ page contentType="text/html; charset=UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<s:iterator value="subordinates" status="usersListStatus">
	<tr>
		<td style="border: 1px solid #4D2929; font-size: 11px;"><s:property	value="#usersListStatus.index +1" /></td>
		<td style="border: 1px solid #4D2929; font-size: 11px;"><a	href="/VentaAutopartes/userSearch/searchUserById.action?userId=<s:property value="userId"/>"><s:property value="userId" /></a></td>
		<td style="border: 1px solid #4D2929;font-size: 11px;" title="<s:property value="boss.userId"/> - <s:property value="boss.name"/> <s:property value="boss.lastName"/> <s:property value="boss.Surame"/>" ><a  href="/VentaAutopartes/userSearch/searchUserById.action?userId=<s:property value="boss.userId"/>"><s:property value="boss.userId"/></a>  </td>
		<td style="border: 1px solid #4D2929; font-size: 11px;"><a href="/VentaAutopartes/userSearch/searchUserById.action?userId=<s:property value="userId"/>"><s:property	value="user" /></a></td>
		<td style="border: 1px solid #4D2929; font-size: 11px;"><s:property value="name" /></td>
		<td style="border: 1px solid #4D2929; font-size: 11px;"><s:property	value="lastName" /></td>
		<td style="border: 1px solid #4D2929; font-size: 11px;"><s:property	value="surName" /></td>
		<td style="border: 1px solid #4D2929; font-size: 11px;"><s:property
				value="email" /></td>
		<td style="border: 1px solid #4D2929; font-size: 11px;"><s:property
				value="userBranch.branchUserRole.branchUserRole" /></td>
		<td style="border: 1px solid #4D2929; font-size: 11px;"><s:property
				value="gender.gender" /></td>
		<td style="border: 1px solid #4D2929; font-size: 11px;"><s:iterator
				value="phoneContact.phoneList">

				<s:if
					test="(phoneNumber != null && phoneType=='WORK TELEPHONE' || phoneType=='OFFICE')">
					<s:property value="phoneNumber" />
					<br>
				</s:if>

			</s:iterator></td>
		<td style="border: 1px solid #4D2929; font-size: 11px;"><s:iterator
				value="phoneContact.phoneList">
				<s:if
					test="(phoneNumber != null && phoneType=='HOME TELEPHONE' || phoneType=='CELL PHONE')">
					<s:property value="phoneNumber" />
					<br>
				</s:if>

			</s:iterator></td>
		<td style="border: 1px solid #4D2929; font-size: 11px;">
			<ul id="icons" class="ui-widget ui-helper-clearfix">
				<li class="ui-state-default ui-corner-all" title="Editar"><a
					class="ui-icon ui-icon-pencil"
					href="/VentaAutopartes/userSearch/updateUserDetailsById.action?userId=<s:property value="userId"/>"></a></li>
				<li class="ui-state-default ui-corner-all" title="Eliminar"><s:if
						test="(subordinates.size()>0)">
						<a class="ui-icon ui-icon-trash" href="#"
							onclick="javascript:alert('No puede eliminar este usuario ya que tiene asignado personal a su cargo');"></a>
					</s:if> 
					<s:else>
						<a class="ui-icon ui-icon-trash" href="/VentaAutopartes/userSearch/deleteUserById.action?userId=<s:property value="userId"/>"></a>
					</s:else></li>
			</ul>
		</td>
	</tr>
	<s:if test="(subordinates.size>0)">
		<s:include value="/jsp/tiles/private/administrator/body/search/user/recursiveNodeSubordinates.jsp"> </s:include>
	</s:if>
</s:iterator>
